#pragma once
#include<iostream>
#include"comm.hpp"

class client
{
public:
    client():_fp(-1)
    {}

    bool openpipe()//打开文件
    {
        _fp = coomopen(W);
        if(_fp < 0)
        {
            return true;
        }
        return false;
    }
    int wpipe(const std::string & in)//读字符串
    {
       return  ::write(_fp,in.c_str(),in.size());
    }
    void closepipe()//关闭文件
    {
        commclose(_fp);
    }
    ~client()
    {
        
    }
private:
    int _fp; 
};